package com.leetcode.algorithm.y22.m06;

/**
 * 344. 反转字符串
 * 
 * https://leetcode.cn/problems/reverse-string/
 * 
 * @author jie.deng
 *
 */
public class Question0344Solution01 {

	public void reverseString(char[] s) {
		int l = 0;
		int r = s.length - 1;
		while (l < r) {
			char tmp = s[l];
			s[l++] = s[r];
			s[r--] = tmp;
		}
	}

}
